import request from '@/utils/request'

// 查询列表
export function listMemberCoin(query) {
  return request({
    url: '/aipay/member/coin/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getMemberCoin(id) {
  return request({
    url: '/aipay/member/coin/' + id,
    method: 'get'
  })
}

//提现
export function withdrawMemberCoin(data) {
  return request({
    url: '/aipay/member/coin/withdraw',
    method: 'post',
    data: data
  })
}

// 新增
export function addMemberCoin(data) {
  return request({
    url: '/aipay/member/coin',
    method: 'post',
    data: data
  })
}

// 修改
export function updateMemberCoin(data) {
  return request({
    url: '/aipay/member/coin',
    method: 'put',
    data: data
  })
}

// 删除
export function delMemberCoin(id) {
  return request({
    url: '/aipay/member/coin/' + id,
    method: 'delete'
  })
}

// 查看私钥
export function getPrivateKey(id) {
  return request({
    url: '/aipay/member/coin/private/' + id,
    method: 'get'
  })
}

// 更新地址
export function updateAddress(data) {
  return request({
    url: '/aipay/member/coin/updateAddress',
    method: 'post',
    data: data
  })
}
